<template>
	<view class="container">
		<!-- Hero Section -->
		<view class="hero-section">
			<view class="hero-content">
				<view class="content-wrapper">
					<text class="hero-title">BeryAI</text>
					<text class="hero-subtitle">智能客服企业级开源解决方案</text>
					<text class="hero-desc">为中小型企业提供专业的AI客服系统</text>
					<view class="hero-buttons">
						<button class="btn primary" @click="enterSystem">
							<text class="btn-text">立即体验</text>
							<text class="btn-icon fas fa-arrow-right"></text>
						</button>
						<button class="btn secondary" @click="learnMore">
							<text class="btn-text">了解更多</text>
							<text class="btn-icon fas fa-info-circle"></text>
						</button>
					</view>
				</view>
			</view>
			<view class="hero-image">
				<image src="/static/images/ai-service.svg" mode="aspectFit" class="floating"></image>
			</view>
		</view>

		<!-- Features Section -->
		<view class="features-section">
			<view class="section-title">
				<text class="title-text">核心优势</text>
				<text class="subtitle-text">让AI为您的企业服务</text>
				<view class="title-decoration"></view>
			</view>
			
			<view class="features-grid">
				<view class="feature-card">
					<view class="feature-icon">
						<text class="fas fa-robot"></text>
					</view>
					<text class="feature-title">智能对话</text>
					<text class="feature-desc">基于先进AI技术，实现自然流畅的对话体验</text>
				</view>
				
				<view class="feature-card">
					<view class="feature-icon">
						<text class="fas fa-clock"></text>
					</view>
					<text class="feature-title">24小时服务</text>
					<text class="feature-desc">全天候在线，随时响应客户需求</text>
				</view>
				
				<view class="feature-card">
					<view class="feature-icon">
						<text class="fas fa-sliders"></text>
					</view>
					<text class="feature-title">个性化定制</text>
					<text class="feature-desc">根据企业需求，量身定制解决方案</text>
				</view>
				
				<view class="feature-card">
					<view class="feature-icon">
						<text class="fas fa-chart-line"></text>
					</view>
					<text class="feature-title">数据分析</text>
					<text class="feature-desc">深度分析客户数据，提供决策支持</text>
				</view>
			</view>
			
			<!-- CTA按钮 -->
			<view class="cta-section">
				<button class="cta-button" @click="enterSystem">
					<text class="btn-text">开始使用</text>
					<text class="btn-icon fas fa-rocket"></text>
				</button>
			</view>
		</view>

		<!-- Contact Section -->
		<view class="contact-section">
			<view class="contact-card">
				<view class="contact-header">
					<text class="contact-title">联系我们</text>
					<view class="title-underline"></view>
				</view>
				<view class="contact-grid">
					<view class="info-item">
						<text class="info-icon fas fa-user"></text>
						<view class="info-content">
							<text class="label">联系人</text>
						<text class="value">张学东</text>
						</view>
					</view>
					<view class="info-item">
						<text class="info-icon fas fa-phone"></text>
						<view class="info-content">
							<text class="label">电话</text>
						<text class="value">13098673303</text>
						</view>
					</view>
					<view class="info-item">
						<text class="info-icon fas fa-envelope"></text>
						<view class="info-content">
							<text class="label">邮箱</text>
						<text class="value">shibaizhelianmeng@163.com</text>
						</view>
					</view>
					<view class="info-item">
						<text class="info-icon fab fa-weixin"></text>
						<view class="info-content">
							<text class="label">微信</text>
						<text class="value">EonNetWork</text>
						</view>
					</view>
					<view class="info-item">
						<text class="info-icon fas fa-map-marker-alt"></text>
						<view class="info-content">
							<text class="label">地址</text>
						<text class="value">重庆市</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<!-- Footer Section -->
		<view class="footer-section">
			<text class="copyright">© 2023 BeryAI - 智能客服企业级开源解决方案</text>
			<view class="footer-links">
				<text class="footer-link" @click="learnMore">了解更多</text>
				<text class="footer-link" @click="enterSystem">立即体验</text>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			animated: false
		}
	},
	mounted() {
		this.animateFeatures();
	},
	methods: {
		animateFeatures() {
			this.$nextTick(() => {
				setTimeout(() => {
					this.animated = true;
				}, 100);
			});
		},
		learnMore() {
			uni.navigateTo({
				url: '/pages/detail/detail',
				fail: () => {
			uni.reLaunch({
				url: '/pages/detail/detail'
					});
				}
			});
		},
		enterSystem() {
			uni.navigateTo({
				url: '/pages/login/login',
				fail: () => {
			uni.reLaunch({
				url: '/pages/login/login'
					});
				}
			});
		}
	}
}
</script>

<style lang="scss">
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

.container * {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.container {
	width: 100%;
	min-height: 100vh;
	background: #ffffff;
	overflow-x: hidden;
	font-family: 'Poppins', sans-serif;
}

.hero-section {
	position: relative;
	width: 100%;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 8rem;
	background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
	overflow: hidden;

	&::before {
		content: '';
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background: radial-gradient(circle at 20% 20%, rgba(92, 107, 192, 0.05) 0%, transparent 50%),
					radial-gradient(circle at 80% 80%, rgba(63, 81, 181, 0.05) 0%, transparent 50%);
		z-index: 1;
	}

	.hero-content {
		position: relative;
		z-index: 2;
		flex: 1;
		padding-right: 4rem;
		animation: fadeInLeft 1s ease-out;

		.content-wrapper {
			max-width: 600px;
		}

		.hero-title {
			font-size: 4.5rem;
			font-weight: 800;
			background: linear-gradient(135deg, #5c6bc0 0%, #3f51b5 100%);
			-webkit-background-clip: text;
			-webkit-text-fill-color: transparent;
			margin-bottom: 1rem;
			display: block;
			line-height: 1.1;
		}

		.hero-subtitle {
			font-size: 2rem;
			font-weight: 600;
			color: #2c3e50;
			margin-bottom: 1rem;
			display: block;
		}

		.hero-desc {
			font-size: 1.2rem;
			color: #666;
			margin-bottom: 3rem;
			display: block;
		}

		.hero-buttons {
			display: flex;
			gap: 1.5rem;
		}
	}

	.hero-image {
		position: relative;
		z-index: 2;
		flex: 1;
		display: flex;
		justify-content: center;
		align-items: center;
		animation: fadeInRight 1s ease-out;

		image {
			width: 100%;
			max-width: 600px;
			height: auto;
		}
	}
}

.btn {
	position: relative;
	padding: 1rem 2.5rem;
	border-radius: 50px;
	font-weight: 600;
	font-size: 1rem;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.3s ease;
	border: none;
	outline: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	overflow: hidden;

	&::before {
		content: '';
		position: absolute;
		top: 0;
		left: -100%;
		width: 100%;
		height: 100%;
		background: rgba(255, 255, 255, 0.2);
		transition: all 0.4s ease;
	}

	&:hover::before {
		left: 100%;
	}

	.btn-icon {
		font-size: 1.1rem;
		transition: transform 0.3s ease;
	}

	&:hover .btn-icon {
		transform: translateX(3px);
	}

	&.primary {
		background: linear-gradient(135deg, #5c6bc0 0%, #3f51b5 100%);
		color: #fff;
		box-shadow: 0 10px 20px rgba(92, 107, 192, 0.2);

		&:hover {
			transform: translateY(-2px);
			box-shadow: 0 15px 30px rgba(92, 107, 192, 0.3);
		}

		&:active {
			transform: translateY(0);
			box-shadow: 0 5px 15px rgba(92, 107, 192, 0.2);
		}
	}

	&.secondary {
		background: transparent;
		color: #5c6bc0;
		border: 2px solid #5c6bc0;
		position: relative;
		z-index: 1;
		
		&::after {
			content: '';
			position: absolute;
			bottom: 0;
			left: 0;
			width: 100%;
			height: 0;
			background: rgba(92, 107, 192, 0.1);
			transition: height 0.3s ease;
			z-index: -1;
		}

		&:hover {
			transform: translateY(-2px);
			
			&::after {
				height: 100%;
			}
		}

		&:active {
			transform: translateY(0);
		}
	}
}

.features-section {
	padding: 8rem 8rem;
	background: #ffffff;
	position: relative;

	.section-title {
		text-align: center;
		margin-bottom: 6rem;
		position: relative;

		.title-text {
			font-size: 2.5rem;
			font-weight: 700;
			color: #2c3e50;
			display: block;
			margin-bottom: 1rem;
		}

		.subtitle-text {
			font-size: 1.2rem;
			color: #666;
		}
		
		.title-decoration {
			width: 120px;
			height: 4px;
			background: linear-gradient(135deg, #5c6bc0 0%, #3f51b5 100%);
			margin: 1.5rem auto 0;
			border-radius: 2px;
		}
	}

	.features-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 3rem;
		max-width: 1200px;
		margin: 0 auto;
	}

	.feature-card {
		background: #ffffff;
		padding: 3rem 2rem;
		border-radius: 20px;
		box-shadow: 0 10px 30px rgba(0,0,0,0.05);
		transition: all 0.5s ease;
		text-align: center;
		border: 1px solid rgba(240, 242, 255, 0.8);

		&:hover {
			transform: translateY(-10px);
			box-shadow: 0 20px 40px rgba(92, 107, 192, 0.1);

			.feature-icon {
				background: linear-gradient(135deg, #5c6bc0 0%, #3f51b5 100%);
				transform: scale(1.1) rotate(5deg);

				.fas {
					color: #fff;
				}
			}
		}

		.feature-icon {
			width: 90px;
			height: 90px;
			margin: 0 auto 2rem;
			background: #f8f9fa;
			border-radius: 50%;
			display: flex;
			align-items: center;
			justify-content: center;
			transition: all 0.5s ease;

			.fas {
				font-size: 2.5rem;
				color: #5c6bc0;
				transition: all 0.5s ease;
			}
		}

		.feature-title {
			font-size: 1.5rem;
			font-weight: 600;
			color: #2c3e50;
			margin-bottom: 1rem;
			display: block;
		}

		.feature-desc {
			font-size: 1.1rem;
			color: #666;
			line-height: 1.6;
		}
	}
}

.cta-section {
	text-align: center;
	margin-top: 5rem;
	
	.cta-button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 12px;
		background: linear-gradient(135deg, #5c6bc0 0%, #3f51b5 100%);
		color: white;
		font-size: 1.2rem;
		font-weight: 600;
		padding: 1.2rem 3rem;
		border-radius: 50px;
		border: none;
		box-shadow: 0 10px 25px rgba(92, 107, 192, 0.25);
		transition: all 0.3s ease;
		cursor: pointer;
		
		&:hover {
			transform: translateY(-5px);
			box-shadow: 0 15px 35px rgba(92, 107, 192, 0.35);
			
			.btn-icon {
				transform: translateY(-3px) rotate(10deg);
			}
		}
		
		&:active {
			transform: translateY(-2px);
			box-shadow: 0 10px 20px rgba(92, 107, 192, 0.25);
		}
		
		.btn-icon {
			font-size: 1.3rem;
			transition: all 0.3s ease;
		}
	}
}

.contact-section {
	padding: 8rem 8rem;
	background: linear-gradient(135deg, #f8f9ff 0%, #f0f3ff 100%);
	position: relative;

	.contact-card {
		background: #ffffff;
		border-radius: 20px;
		padding: 4rem;
		box-shadow: 0 20px 40px rgba(92, 107, 192, 0.08);
		max-width: 900px;
		margin: 0 auto;
		animation: fadeInUp 1s ease-out;
	}
	
	.contact-header {
		text-align: center;
		margin-bottom: 3rem;
	}

	.contact-title {
		font-size: 2.2rem;
		font-weight: 700;
		color: #2c3e50;
		display: block;
	}
	
	.title-underline {
		width: 80px;
		height: 4px;
		background: linear-gradient(135deg, #5c6bc0 0%, #3f51b5 100%);
		margin: 1rem auto 0;
		border-radius: 2px;
	}
	
	.contact-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 2rem;
	}

	.info-item {
		display: flex;
		align-items: flex-start;
		padding: 1.5rem;
		border-radius: 15px;
		transition: all 0.3s ease;
		background: rgba(248, 249, 255, 0.5);
		border: 1px solid rgba(240, 242, 255, 0.8);
		
		&:hover {
			transform: translateY(-5px);
			box-shadow: 0 10px 25px rgba(92, 107, 192, 0.1);
			background: white;
		}
		
		.info-icon {
			font-size: 1.5rem;
			color: #5c6bc0;
			margin-right: 1rem;
		display: flex;
		align-items: center;
			justify-content: center;
			width: 50px;
			height: 50px;
			background: rgba(92, 107, 192, 0.1);
			border-radius: 50%;
		}
		
		.info-content {
			flex: 1;
		}

		.label {
			color: #888;
			font-size: 0.9rem;
			margin-bottom: 0.3rem;
			display: block;
		}

		.value {
			color: #2c3e50;
			font-size: 1.1rem;
			font-weight: 600;
			word-break: break-word;
		}
	}
}

.footer-section {
	background: #2c3e50;
	color: rgba(255, 255, 255, 0.8);
	padding: 2rem 4rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	
	.copyright {
		font-size: 0.9rem;
	}
	
	.footer-links {
		display: flex;
		gap: 2rem;
	}
	
	.footer-link {
		color: rgba(255, 255, 255, 0.8);
		font-size: 0.95rem;
		transition: all 0.3s ease;
		cursor: pointer;
		
		&:hover {
			color: white;
			text-decoration: underline;
		}
	}
}

@keyframes fadeInLeft {
	from {
		opacity: 0;
		transform: translateX(-50px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes fadeInRight {
	from {
		opacity: 0;
		transform: translateX(50px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.floating {
	animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
	0% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-20px);
	}
	100% {
		transform: translateY(0px);
	}
}

@media screen and (max-width: 1024px) {
	.hero-section,
	.features-section,
	.contact-section {
		padding: 4rem 3rem;
	}

	.hero-section {
		.hero-content {
			padding-right: 2rem;

			.hero-title {
				font-size: 3.5rem;
			}

			.hero-subtitle {
				font-size: 1.8rem;
			}
		}
	}
	
	.contact-section .contact-grid {
		grid-template-columns: 1fr;
	}
}

@media screen and (max-width: 768px) {
	.hero-section {
		flex-direction: column;
		padding: 2rem;
		text-align: center;
		min-height: auto;
		padding-top: 6rem;

		.hero-content {
			padding-right: 0;
			margin-bottom: 3rem;

			.hero-buttons {
				justify-content: center;
			}

			.hero-title {
				font-size: 3rem;
			}

			.hero-subtitle {
				font-size: 1.5rem;
			}

			.hero-desc {
				font-size: 1.1rem;
			}
		}

		.hero-image {
			image {
				max-width: 300px;
			}
		}
	}

	.features-section {
		padding: 4rem 2rem;

		.features-grid {
			grid-template-columns: 1fr;
			gap: 2rem;
		}
	}

	.contact-section {
		padding: 4rem 2rem;

		.contact-card {
			padding: 2rem;
		}
	}

	.btn {
		padding: 0.8rem 2rem;
		font-size: 0.9rem;
	}
	
	.footer-section {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
		
		.copyright {
			margin-bottom: 1rem;
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.floating,
	.feature-card,
	.contact-card {
		animation: none !important;
		transition: none !important;
	}
}
</style> 